package com.dms.controller;


import com.dms.common.Result;
import com.dms.entity.Menu;
import com.dms.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author dms
 * @since 2023-01-17
 */
@RestController
@RequestMapping("/menu")
public class MenuController {
    @Autowired
   private MenuService menuService;
@GetMapping("/list")
    public Result list(@RequestParam String roleId){
    List list=menuService.lambdaQuery().like(Menu::getMenuright,roleId).list();
    HashMap res=new HashMap();
    res.put("tabledata",list);
      return Result.suc(res);


}



}
